package com.swanclouds.redfish.systems.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.model.Device;

import java.util.Map;

/**
 * @author 张立强
 * @version jdk1.8.0
 */
public class VLAN extends Device {

    @JsonProperty("VLANEnable")
    private Boolean enable;

    @JsonProperty("VLANId")
    private Integer vlanId;

    @JsonProperty("Oem")
    private Map<String,Object> oem;

    public Boolean getEnable() {
        return enable;
    }

    public Integer getVlanId() {
        return vlanId;
    }

    public Map<String, Object> getOem() {
        return oem;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "VLAN {" +
                "enable=" + enable +
                ", vlanId=" + vlanId +
                ", oem=" + oem +
                '}';
    }
}
